<!--添加用户表单-->
<div class="tab_edit">
    <form action="{:Url('loan_audit_submit')}" method="post" id="loan_audit_submit">
        <input type="hidden" name="loan_product_id" value="{$loan_product_id}"/>
        <table width="100%" class="list">
            <tr>
                <td class="t_r t_left_w">所属机构类型：</td>
                <td class="t_l">{:widget('common/Select/select',array('loan_agency_type','loan_agency_type',$loan_info['loan_agency_type'],true,true))}</td>
            </tr>
            <tr>
                <td class="t_r t_left_w">所属机构名称：</td>
                <td class="t_l">{:widget('common/Select/select_parent',array('loan_agency_id',array($loan_agency_list,"loan_agency_id","loan_agency_name","loan_agency_type"),'loan_agency_type',$loan_info['loan_agency_id'],true,true))}</td>
            </tr>
            <tr>
                <td class="t_r t_left_w">贷款产品名称：</td>
                <td class="t_l">{:widget("common/Input/input",array("loan_product_name",$loan_info['loan_product_name'],true,true,"width:85%;"))}</td>
            </tr>
            <tr>
                <td class="t_r t_left_w">名称拼音缩写：</td>
                <td class="t_l">{:widget("common/Input/input",array("loan_product_name_py",$loan_info['loan_product_name_py'],true,true))}</td>
            </tr>
            <tr>
                <td class="t_r t_left_w">有效区域：</td>
                <td class="t_l">
                    <div class="lists-tab-cont" style="width: 810px;border: 1px solid #ddd;">
                        <table width="100%" cellpadding="0" cellspacing="0" border="0">
                            <thead>
                                <tr>
                                    <th width="70%" class="tabSort-header">有效区域省份/城市<font color="red">（默认：不填表示全国有效！)</font></th>
                                </tr>
                            </thead>
                            <tbody>
                                {foreach name="product_area_list" item="info"}
                                    <tr class="info">
                                        <td>{:widget('common/Name/area',array($info['province']))}、{:widget('common/Name/area',array($info['city']))}</td>
                                    </tr>
                                {/foreach}
                            </tbody>
                        </table>
                    </div>
                </td>
            </tr>
            <tr>
                <td class="t_r t_left_w">抵押方式：</td>
                <td class="t_l">{:widget('common/Radio/radio',array('loan_pledge','loan_pledge',$loan_info['loan_pledge'],true,true))}</td>
            </tr>
            <tr>
                <td class="t_r t_left_w">还款方式：</td>
                <td class="t_l">{:widget('common/Radio/radio',array('loan_repayment','loan_repayment',$loan_info['loan_repayment'],true,true))}</td>
            </tr>
            <tr>
                <td class="t_r t_left_w">到账期限：</td>
                <td class="t_l">{:widget("common/Input/input",array("lending_day",$loan_info['lending_day'],true,true))}（单位：天数）</td>
            </tr>
            <tr>
                <td class="t_r t_left_w">贷款审核天数：</td>
                <td class="t_l">{:widget("common/Input/input",array("approval_day",$loan_info['approval_day'],true,true))}（单位：天数）</td>
            </tr>
            <tr>
                <td class="t_r t_left_w">最小/最大贷款金额 ：</td>
                <td class="t_l">{:widget("common/Input/input",array("min_loan_money",$loan_info['min_loan_money'],true,true))}（单位：万元）～{:widget("common/Input/input",array("max_loan_money",$loan_info['max_loan_money'],true,true))}（单位：万元）</td>
            </tr>
            <tr>
                <td class="t_r t_left_w">最小/最大贷款期限 ：</td>
                <td class="t_l">{:widget("common/Input/input",array("min_period",$loan_info['min_period'],true,true))}（单位：月数）～{:widget("common/Input/input",array("max_period",$loan_info['max_period'],true,true))}（单位：月数）</td>
            </tr>
            <tr>
                <td class="t_r t_left_w">最小/最大年龄 ：</td>
                <td class="t_l">{:widget("common/Input/input",array("min_age",$loan_info['min_age'],true,true))}（单位：周岁）～{:widget("common/Input/input",array("max_age",$loan_info['max_age'],true,true))}（单位：周岁）</td>
            </tr>
            <tr>
                <td class="t_r t_left_w">利率信息（展示）：</td>
                <td class="t_l">
                    最小/最大月利率：{:widget("common/Input/input",array("rate_info[min_rate]",$loan_info['rate_info']['min_rate'],false,true))}% ～ {:widget("common/Input/input",array("rate_info[max_rate]",$loan_info['rate_info']['max_rate'],false,true))}%<br><br>
                    最小/最大月费用：{:widget("common/Input/input",array("rate_info[min_fee]",$loan_info['rate_info']['min_fee'],false,true))}% ～ {:widget("common/Input/input",array("rate_info[max_fee]",$loan_info['rate_info']['max_fee'],false,true))}%
                </td>
            </tr>
            <tr>
                <td class="t_r t_left_w">一次性费用（计算）：</td>
                <td class="t_l">{:widget("common/Input/input",array("nonrecurring_rate",$loan_info['nonrecurring_rate'],true,true))}%</td>
            </tr>
            <tr>
                <td class="t_r t_left_w">总利率（计算）：</td>
                <td class="t_l">{:widget("common/Input/input",array("total_rate",$loan_info['total_rate'],true,true))}% <font color="red">备注：不包含一次性费用；</font></td>
            </tr>
            <tr>
                <td class="t_r t_left_w">初始化申请数量：</td>
                <td class="t_l">{:widget("common/Input/input",array("apply_init_count",$loan_info['apply_init_count'],true,true))}</td>
            </tr>
            <tr>
                <td class="t_r t_left_w">提前还款说明：</td>
                <td class="t_l">{:widget("common/TextArea/text_area",array("advance_repay",$loan_info['advance_repay'],true,true,"width:85%;"))}</td>
            </tr>
            <tr>
                <td class="t_r t_left_w">申请条件：</td>
                <td class="t_l">
                    <div class="lists-tab-cont" style="width: 100%;border: 1px solid #ddd;">
                        <table width="100%" cellpadding="0" cellspacing="0" border="0">
                            <thead>
                                <tr>
                                    <th width="85%" class="tabSort-header">申请条件</th>
                                </tr>
                            </thead>
                            <tbody>
                                {foreach name="loan_info['loan_apply_condition_str']" item="info"}
                                    <tr class="info"><td>{$info}</td></tr>
                                {/foreach}
                            </tbody>
                        </table>
                    </div>
                </td>
            </tr>
            <tr>
                <td class="t_r t_left_w">申请材料：</td>
                <td class="t_l">
                    <div class="lists-tab-cont" style="width: 100%;border: 1px solid #ddd;">
                        <table width="100%" cellpadding="0" cellspacing="0" border="0">
                            <thead>
                                <tr>
                                    <th width="85%" class="tabSort-header">申请材料</th>
                                </tr>
                            </thead>
                            <tbody>
                                {foreach name="loan_info['loan_apply_material_str']" item="info"}
                                    <tr class="info"><td>{$info}</td></tr>
                                {/foreach}
                            </tbody>
                        </table>
                    </div>
                </td>
            </tr>
            <tr>
                <td class="t_r t_left_w">是否允许有不良信用记录：</td>
                <td class="t_l">{:widget('common/Radio/radio',array('credit_record','credit_record',$loan_info['credit_record'],true,true))}</td>
            </tr>
            <tr>
                <td class="t_r t_left_w">本市是否有房产：</td>
                <td class="t_l">{:widget('common/Radio/radio',array('is_house','is_house',$loan_info['is_house'],true,true))}</td>
            </tr>
            <tr>
                <td class="t_r t_left_w">房产类型要求：</td>
                <td class="t_l">{:widget('common/CheckBox/checkbox',array('loan_house','house_type',$loan_info['loan_house_list'],null,null,false,true))}</td>
            </tr>
            <tr>
                <td class="t_r t_left_w">职业身份要求：</td>
                <td class="t_l">{:widget('common/CheckBox/checkbox',array('loan_identity','identity',$loan_info['loan_identity_list'],null,null,true,true))}</td>
            </tr>
            <tr>
                <td class="t_r t_left_w">营业执照年限：</td>
                <td class="t_l">{:widget("common/Input/input",array("business_time",$loan_info['business_time'],false,true))}</td>
            </tr>
            <tr>
                <td class="t_r t_left_w">初始化申请数量：</td>
                <td class="t_l">{:widget("common/Input/input",array("flow",$loan_info['flow'],false,true))} （单位：万元）</td>
            </tr>
            <tr>
                <td class="t_r t_left_w">排序：</td>
                <td class="t_l">{:widget("common/Input/input",array("order_by",$loan_info['order_by'],false,true))}</td>
            </tr>
            <tr>
                <td class="t_r t_left_w">备注：</td>
                <td class="t_l">{:widget('common/TextArea/text_area',array('remark',$loan_info['remark'],false,true,"width:85%"))}</td>
            </tr>
            <tr>
                <td class="t_r t_left_w">审核状态：</td>
                <td class="t_l">{:widget('common/Radio/radio',array('loan_status','loan_status_temp',null,true))}</td>
            </tr>
            <tr>
                <td class="t_r t_left_w">审核说明：</td>
                <td class="t_l">
                    {:widget('common/TextArea/text_area',array('audit_note',null,false,false,"width:800px;"))}
                </td>
            </tr>
            <tr>
                <td class="t_r t_left_w"></td>
                <td class="t_l">
                    <div class="btn"><input type="submit" class="but_blue" value="保存信息"></div>
                </td>
            </tr>
        </table>
    </form>
</div>

<!-- JS处理 -->
<script language="javascript">
    $(function(){
        //提示信息
        $("#loan_audit_submit").submit(function(){
            //判断是否选择是否
            if($("input[name='loan_status']:checked").val() == 3){

                //判断是否填写失败理由
                if($.trim($("textarea[name='audit_note']").val()) == ""){
                    alert("请填写审核失败说明！");
                    return false;
                }
            }

            //审核通过
            return true;
        });
    });
</script>